﻿

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Media;




namespace MPSystem.Util
{
   public  class LineDatas
    {


            string title;

            double min;

            double max;

           List<string> xData; 
           List<DoubleCollection> yData;

            int startIndex;

            int endIndex;

            public double Min

            {

                get

                {

                    return min;

                }



                set

                {

                    min = value;

                }

            }



            public double Max

            {

                get

                {

                    return max;

                }



                set

                {

                    max = value;

                }

            }







            public string Title

            {

                get

                {

                    return title;

                }



                set

                {

                    title = value;

                }

            }

 

            public int StartIndex

            {

                get

                {

                    return startIndex;

                }



                set

                {

                    startIndex = value;

                }

            }



            public int EndIndex

            {

                get

                {

                    return endIndex;

                }



                set

                {

                    endIndex = value;

                }

            }



        public List<string>  XData

            {

                get

                {

                    return xData;

                }



                set

                {

                    xData = value;

                }

            }

        public List<DoubleCollection> YData { get => yData; set => yData = value; } 

        public LineDatas()

            {

                this.title = "";

                this.Max = 0;

                this.Min = 0;

                this.YData = new List<DoubleCollection>();
                this.XData = new List<string>();
             


            }

        /// <summary>

        /// 

        /// </summary>

        /// <param name="_title">数据标题</param>

        /// <param name="min">数据最小值</param>

        /// <param name="max">数据最大值</param>

        /// <param name="_xData">x坐标</param>

        /// <param name="_YData">Y数据</param> 
        //DoubleCollection rtdata, DoubleCollection thdata,
        public LineDatas(string _title, double min, double max, List<string> _xData, List<DoubleCollection>_YData)

            {

                this.title = _title;

                this.Min = min;

                this.Max = max;

                this.XData = _xData;

                //this.RtData = rtdata;

                //this.ThData = thdata;

                this.StartIndex = 0;

                // this.EndIndex = rtData.Count - 1;
                foreach(var r in _YData)
                {
                    this.EndIndex = r.Count - 1;
                }
               // this.EndIndex = _xData.Count - 1;
                this.YData = _YData;

            }

            public void clear()

            {

              this.XData.Clear();

            //this.RtData.Clear();


            this.YData.Clear();

            }

        }

    }

 